package com.medical.controller;

import com.medical.entity.UserEntity;
import com.medical.service.PrescriptionService;
import com.medical.tool.R;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

@RestController
@RequestMapping("/prescription")
public class PrescriptionController {
    @Autowired
    private PrescriptionService prescriptionService;

    /**
     * 通过用户名查找用户诚信记录
     *
     * @param
     * @return
     */
    @GetMapping("/findUserByUserName")
    public R selectByUserName(String userName) {
        return new R(200, "查询成功", prescriptionService.selectByUserName(userName));
    }
}
